package com.zkthink.ceres.promotion.dao;

import com.zkthink.base.mapper.SuperMapper;
import com.zkthink.ceres.promotion.entity.Promotion;
import com.zkthink.ceres.promotion.vo.admin.PromotionAdminVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 营销活动表
 * </p>
 *
 * @author kellen
 * @date 2020-06-16
 */
@Repository
public interface PromotionProductMapper {

	/** 插入活动和商品的关联关系
	 * @author 善泉 2020/6/28 18:50
	 * @return
	 */
	int insert(@Param("promotionId")Long promotionId, @Param("productId")Long productId);

	/** 活动结束，删除活动和商品的关联关系
	 * @author 善泉 2020/6/28 19:18
	 * @return
	 */
	int deleteRelation(List<Long> promotionEndIdList);

	/**
	 * 删除活动和指定商品的关联关系
	 * @param promotionId
	 * @param productIds
	 * @return
	 */
    int deleteSpecifiedRelation(@Param("promotionId")Long promotionId, @Param("productIds")String productIds);
}
